package com.example.ignite.service;

import com.example.ignite.dao.OrderMapper;
import com.example.ignite.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service(value = "orderService")
@Transactional
public class OrderService {

    @Autowired
    private OrderMapper orderMapper;

    public Order selectByPrimaryKey(String orderId) {
        return orderMapper.selectByPrimaryKey(orderId);

    }

    public Integer insert(String orderId) {
        Order order = new Order();
        order.setOrderId(orderId);
        return orderMapper.insert(order);
    }
}